<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>



	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>SlickSpeed Selectors Test</title>
	<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
	
	<script type="text/javascript">
		window.selectors = ['*','div:only-child','div:first-child','div:nth-child(even)','div:nth-child(2n)','div:nth-child(odd)','div:nth-child(2n+1)','div:nth-child(n)','div:last-child','div > div','div + div','div ~ div','body','body div','div','div div','div div div','div, div, div','div, a, span','.dialog','div.dialog','div .dialog','div.character, div.dialog','#speech5','div#speech5','div #speech5','div.scene div.dialog','div#scene1 div.dialog div','#scene1 #speech1','div[%class]','div[%class=dialog]','div[%class^=dia]','div[%class$=log]','div[%class*=sce]','div[%class|=dialog]','div[%class~=dialog]']	</script>
	
	<script src="system/slickspeed.js" type="text/javascript"></script>

</head><body>
	
<div id="container">
	
	<div id="controls">
		<a class="stop" href="#">stop tests</a>
		<a class="start" href="#">start tests</a>
	</div>
	
<h1><span>SlickSpeed</span></h1>
<h2>speed/validity selectors test for frameworks.</h2>

<p>Every framework runs in its own iFrame, thus no conflicts can happen. Tests are run selector by selector, with an interval to prevent the browser from freezing.</p>
<p>Tests are run in a neutral environment, no library or framework is included in the main javascript test, to avoid favoritism.</p>
<p>The WebKit version of this test includes a number of modifications. Specifically
</p><ul>
<li>The tests are run 250 times instead of once to show speed differences more accurately</li>
<li>querySelectorAll is added as a supported "library"</li>
<li>CSS selectors that not all implementations support have been removed to avoid distorting timing results. These will be added back in as new selectors are implemented.</li>
</ul>


<iframe name="prototype 1.6.0.2" src="system/template.php?include=prototype.js&amp;function=$$&amp;modifier=&amp;nocache=1275077693"></iframe>

<iframe name="jQuery 1.2.3" src="system/template.php?include=jquery-1.2.3.js&amp;function=$&amp;modifier=@&amp;nocache=1275077693"></iframe>

<iframe name="ext 2.0" src="system/template.php?include=DomQuery.js&amp;function=Ext.query&amp;modifier=&amp;nocache=1275077693"></iframe>

<iframe name="Native" src="system/template.php?include=dummy.js&amp;function=document.querySelectorAll&amp;modifier=&amp;nocache=1275077693"></iframe>


<table>

	<thead id="thead">
		<tr>

			<th class="selectors-title">selectors</th>
			<th class="framework">prototype 1.6.0.2</th><th class="framework">jQuery 1.2.3</th><th class="framework">ext 2.0</th><th class="framework">Native</th>		</tr>
	</thead>

	<tbody id="tbody">
		<tr><th class="selector">*</th><td class="test bad">167 ms | 251 found</td><td class="test normal">148 ms | 251 found</td><td class="test normal">82 ms | 251 found</td><td class="test good">24 ms | 251 found</td></tr><tr><th class="selector">div:only-child</th><td class="test normal">424 ms | 22 found</td><td class="test bad">581 ms | 22 found</td><td class="test normal">124 ms | 22 found</td><td class="test good">24 ms | 22 found</td></tr><tr><th class="selector">div:first-child</th><td class="test bad">406 ms | 51 found</td><td class="test normal">312 ms | 51 found</td><td class="test normal">106 ms | 51 found</td><td class="test good">24 ms | 51 found</td></tr><tr><th class="selector">div:nth-child(even)</th><td class="test bad">699 ms | 106 found</td><td class="test normal">377 ms | 106 found</td><td class="test normal">211 ms | 106 found</td><td class="test good">26 ms | 106 found</td></tr><tr><th class="selector">div:nth-child(2n)</th><td class="test bad">666 ms | 106 found</td><td class="test normal">363 ms | 106 found</td><td class="test normal">208 ms | 106 found</td><td class="test good">27 ms | 106 found</td></tr><tr><th class="selector">div:nth-child(odd)</th><td class="test bad">741 ms | 137 found</td><td class="test normal">381 ms | 137 found</td><td class="test normal">214 ms | 137 found</td><td class="test good">27 ms | 137 found</td></tr><tr><th class="selector">div:nth-child(2n+1)</th><td class="test bad">692 ms | 137 found</td><td class="test normal">379 ms | 137 found</td><td class="test normal">213 ms | 137 found</td><td class="test good">29 ms | 137 found</td></tr><tr><th class="selector">div:nth-child(n)</th><td class="test bad">886 ms | 243 found</td><td class="test normal">398 ms | 243 found</td><td class="test normal">210 ms | 243 found</td><td class="test good">27 ms | 243 found</td></tr><tr><th class="selector">div:last-child</th><td class="test normal">388 ms | 53 found</td><td class="test bad">412 ms | 53 found</td><td class="test normal">107 ms | 53 found</td><td class="test good">24 ms | 53 found</td></tr><tr><th class="selector">div &gt; div</th><td class="test bad">528 ms | 242 found</td><td class="test normal">303 ms | 242 found</td><td class="test normal">450 ms | 242 found</td><td class="test good">27 ms | 242 found</td></tr><tr><th class="selector">div + div</th><td class="test bad">709 ms | 190 found</td><td class="test normal">379 ms | 190 found</td><td class="test normal">171 ms | 190 found</td><td class="test good">26 ms | 190 found</td></tr><tr><th class="selector">div ~ div</th><td class="test bad">2190 ms | 190 found</td><td class="test normal">574 ms | 190 found</td><td class="test normal">186 ms | 190 found</td><td class="test good">27 ms | 190 found</td></tr><tr><th class="selector">body</th><td class="test bad">215 ms | 1 found</td><td class="test normal">17 ms | 1 found</td><td class="test good">6 ms | 1 found</td><td class="test normal">20 ms | 1 found</td></tr><tr><th class="selector">body div</th><td class="test bad">429 ms | 243 found</td><td class="test normal">275 ms | 243 found</td><td class="test normal">83 ms | 243 found</td><td class="test good">36 ms | 243 found</td></tr><tr><th class="selector">div</th><td class="test bad">257 ms | 243 found</td><td class="test normal">142 ms | 243 found</td><td class="test normal">79 ms | 243 found</td><td class="test good">24 ms | 243 found</td></tr><tr><th class="selector">div div</th><td class="test normal">708 ms | 242 found</td><td class="test bad">996 ms | 242 found</td><td class="test normal">422 ms | 242 found</td><td class="test good">27 ms | 242 found</td></tr><tr><th class="selector">div div div</th><td class="test normal">1022 ms | 241 found</td><td class="test bad">2353 ms | 241 found</td><td class="test normal">1115 ms | 241 found</td><td class="test good">30 ms | 241 found</td></tr><tr><th class="selector">div, div, div</th><td class="test bad">847 ms | 243 found</td><td class="test normal">613 ms | 243 found</td><td class="test normal">291 ms | 243 found</td><td class="test good">24 ms | 243 found</td></tr><tr><th class="selector">div, a, span</th><td class="test bad">807 ms | 243 found</td><td class="test normal">277 ms | 243 found</td><td class="test normal">116 ms | 243 found</td><td class="test good">23 ms | 243 found</td></tr><tr><th class="selector">.dialog</th><td class="test bad">296 ms | 51 found</td><td class="test normal">172 ms | 51 found</td><td class="test normal">114 ms | 51 found</td><td class="test good">21 ms | 51 found</td></tr><tr><th class="selector">div.dialog</th><td class="test bad">394 ms | 51 found</td><td class="test normal">171 ms | 51 found</td><td class="test normal">108 ms | 51 found</td><td class="test good">24 ms | 51 found</td></tr><tr><th class="selector">div .dialog</th><td class="test normal">795 ms | 51 found</td><td class="test bad">973 ms | 51 found</td><td class="test normal">540 ms | 51 found</td><td class="test good">22 ms | 51 found</td></tr><tr><th class="selector">div.character, div.dialog</th><td class="test bad">681 ms | 99 found</td><td class="test normal">384 ms | 99 found</td><td class="test normal">229 ms | 99 found</td><td class="test good">26 ms | 99 found</td></tr><tr><th class="selector">#speech5</th><td class="test bad">136 ms | 1 found</td><td class="test good">4 ms | 1 found</td><td class="test good">4 ms | 1 found</td><td class="test normal">21 ms | 1 found</td></tr><tr><th class="selector">div#speech5</th><td class="test bad">226 ms | 1 found</td><td class="test good">21 ms | 1 found</td><td class="test normal">57 ms | 1 found</td><td class="test good">21 ms | 1 found</td></tr><tr><th class="selector">div #speech5</th><td class="test normal">568 ms | 1 found</td><td class="test bad">764 ms | 1 found</td><td class="test normal">359 ms | 1 found</td><td class="test good">21 ms | 1 found</td></tr><tr><th class="selector">div.scene div.dialog</th><td class="test normal">562 ms | 49 found</td><td class="test bad">593 ms | 49 found</td><td class="test normal">205 ms | 49 found</td><td class="test good">24 ms | 49 found</td></tr><tr><th class="selector">div#scene1 div.dialog div</th><td class="test bad">598 ms | 142 found</td><td class="test normal">385 ms | 142 found</td><td class="test normal">233 ms | 142 found</td><td class="test good">35 ms | 142 found</td></tr><tr><th class="selector">#scene1 #speech1</th><td class="test bad">243 ms | 1 found</td><td class="test normal">132 ms | 1 found</td><td class="test normal">59 ms | 1 found</td><td class="test good">21 ms | 1 found</td></tr><tr><th class="selector">div[class]</th><td class="test bad">262 ms | 103 found</td><td class="test normal">256 ms | 103 found</td><td class="test normal">97 ms | 103 found</td><td class="test good">23 ms | 103 found</td></tr><tr><th class="selector">div[class=dialog]</th><td class="test bad">304 ms | 50 found</td><td class="test normal">253 ms | 50 found</td><td class="test normal">90 ms | 50 found</td><td class="test good">25 ms | 50 found</td></tr><tr><th class="selector">div[class^=dia]</th><td class="test bad">275 ms | 51 found</td><td class="test normal">259 ms | 51 found</td><td class="test normal">97 ms | 51 found</td><td class="test good">30 ms | 51 found</td></tr><tr><th class="selector">div[class$=log]</th><td class="test bad">433 ms | 50 found</td><td class="test normal">274 ms | 50 found</td><td class="test normal">95 ms | 50 found</td><td class="test good">31 ms | 50 found</td></tr><tr><th class="selector">div[class*=sce]</th><td class="test bad">264 ms | 1 found</td><td class="test normal">263 ms | 1 found</td><td class="test normal">103 ms | 1 found</td><td class="test good">30 ms | 1 found</td></tr><tr><th class="selector">div[class|=dialog]</th><td class="test bad mismatch">371 ms | 50 found</td><td class="test normal mismatch">254 ms | 103 found</td><td class="test normal mismatch">94 ms | 50 found</td><td class="test good mismatch">31 ms | 50 found</td></tr><tr><th class="selector">div[class~=dialog]</th><td class="test bad">344 ms | 51 found</td><td class="test normal">264 ms | 51 found</td><td class="test normal">109 ms | 51 found</td><td class="test good">32 ms | 51 found</td></tr>	</tbody>

	
	<tfoot id="tfoot">
		<tr>
		<th class="score-title"><strong>final time (less is better)</strong></th>
		<td class="score">&nbsp;19533&nbsp;</td><td class="score">&nbsp;14702&nbsp;</td><td class="score">&nbsp;6987&nbsp;</td><td class="score">&nbsp;934&nbsp;</td>		</tr>
	</tfoot>

</table>

<h2>Legend</h2>

<table id="legend">

	<tbody><tr>
		<th>the faster</th>
		<th>the slower</th>
		<th>exception thrown or zero elements found</th>

		<th>different returned elements</th>
	</tr>

	<tr>
		<td class="good"></td>
		<td class="bad"></td>
		<td class="exception"></td>
		<td class="mismatch"></td>
	</tr>

</tbody></table>

<div id="footer">
	<p class="footer">copyright © 2007 <a href="http://mootools.net">http://mootools.net</a> | MIT License | <a href="http://slickspeed.googlecode.com/svn/trunk">download from googlecode</a></p>
</div></div>

</body></html>